In the last decade, online shopping has played a vital role in the customers' approach to purchase different products, providing convenience to the shops and many benefits for the economy. E-commerce is widely used for digital media products such as movies, images, and software. Thus, the recommendation systems are of great importance, especially in the today's hectic world, which searches for the content that would be interesting to an individual. This research proposes a new two-step recommender system based on the demographic data and user ratings on the public MovieLens datasets. In the first step, clustering on the training dataset is performed based on the demographic data, grouping customers in homogeneous clusters. The clustering includes a hybrid Firefly Algorithm (FA) and K-means approach. Due to the FA's ability to avoid trapping into the local optima, which resolves K-means' main pitfall, the combination of these two techniques leads to a much better performance. In the next step, for each cluster, two recommender systems are proposed based on K-Nearest Neighbor (KNN) and Naï, ve Bayesian Classification. The results obtained are evaluated based on many internal and external measures like the Davies-Bouldin index, precision, accuracy, recall, and F-measure. The results obtained show the effectiveness of the K-means/FA/KNN compared with the other extant models.